/*
 * Update.java
 *
 * Created on 7 październik 2007, 12:54
 *
 */

package kosciak.blip4j;

import java.util.Date;
import java.util.List;

/**
 * <CODE>Update</CODE> object represents an Update in Blip.pl
 * It can be Status or DirectMessage
 * @author Wojtek 'KosciaK' Pietrzok
 * @since 0.1
 */
public abstract class Update {
    
    private int id;
    private String body;
    private Date date;
    private UpdateType type;
    private User from;
    private Transport transport;
    private List<Picture> pictures;

    /** Creates a new instance of Update */
    Update(int id, 
               String body, 
               Date date, 
               UpdateType type, 
               User from, 
               Transport transport,
               List<Picture> pictures) {
        
        this.id = id;
        this.body = body;
        this.date = date;
        this.type = type;
        this.from = from;
        this.transport = transport;
        this.pictures = pictures;
    }
    
    /**
     * Gets Id of an Update
     * @return an Id of an Update
     */
    public int getId() {
        return id;
    }

    /**
     * Gets body of an Update
     * @return a body of an Update
     */
    public String getBody() {
        return body;
    }

    /**
     * Gets date of an Update
     * @return a date when an Update was sent
     */
    public Date getDate() {
        return date;
    }

    /**
     * Gets User who sent an Update
     * @return an User who sent this Update
     */
    public User getFrom() {
        return from;
    }

    /**
     * Gets Type of this Update
     * @return type of an Update
     */
    public UpdateType getType() {
        return type;
    }

    /**
     * Gets <CODE>List</CODE> of Pictures attached to this Update
     * @return <CODE>List</CODE> of Pictures attached to this Update
     */
    public List<Picture> getPictures() {
        return pictures;
    }

    /**
     * Gets Transport of an Update
     * @return a Transport of an Update
     */
    public Transport getTransport() {
        return transport;
    }

}
